40923235 cp2020

  • Home
    • Site Map
    • reveal
    • blog
  • 首頁
  • HW1
    • UNIT 1
      • Strategies for Learning學習策略
      • What You Need to Know About the Course您需要了解的課程內容
      • About these Materials 關於這些材料
      • Metacognition元認知
      • Metacognition in Action行動中的元認知
    • UNIT2
      • Introduction簡介
      • Functions of Computers  Input  Output  Storage  and Processing計算機功能  輸入  輸出  存儲和處理
      • Hardware硬件
      • Software軟件
      • Fireware固件
      • Componentization  Standardization組件化  標準化
      • Connection Interfaces and Cables連接接口和電纜
  • HW2
  • HW3
    • Chacrater input字符輸入
      • input strings types int輸入字符串類型int
      • Discussion討論區-1
      • User input in Python使用Python的用戶輸入
      • Manipulating strings a few ways處理字符串幾種方法
    • Odd Or Even奇數或偶數
      • Exercise 2 and solution練習2和解決方案
      • Discussion討論區-2
      • Modular arithmetic the modulus operator模塊化算術模運算符
      • Conditionals有條件的
      • Checking for equality and comparators in general檢查是否相等以及一般的比較器
    • List Less Than Ten列出少於十
      • Exercise 3 and Solution練習3和解決方案
      • Discussion討論區-3
      • Lists清單
      • More Conditionals更多條件
  • 心得
Chacrater input字符輸入 << Previous Next >> Discussion討論區-1

input strings types int輸入字符串類型int

Calibrating the exercises to the audience is going to be a challenging task, so I ask you to bear with me if the exercises are too easy or too hard. Every week there will be a poll you can click on to discuss whether the exercise is too easy or too hard and hopefully in a few weeks, I’ll get the level right. Let’s get to it! I will start with the exercise and include a discussion later, in case you want the extra challenge.
向觀眾校準練習將是一項艱鉅的任務,因此,我請你忍受練習是否太容易或太難。每週都會有一個民意測驗,你可以單擊以討論該練習是太容易還是太難,希望在幾週後,我會把水平調到正確的水平。讓我們開始吧!如果你需要額外的挑戰,我將從練習開始,並在以後進行討論。

Exercise 1 and solution練習1和解決方案
Create a program that asks the user to enter their name and their age. Print out a message addressed to them that tells them the year that they will turn 100 years old.

Extras:

  1. Add on to the previous program by asking the user for another number and printing out that many copies of the previous message. (Hint: order of operations exists in Python)
  2. Print out that many copies of the previous message on separate lines. (Hint: the string "\n is the same as pressing the ENTER button)

創建一個程序,要求用戶輸入他們的姓名和年齡。打印給他們的消息,告訴他們他們將滿100歲的年份。

附加功能:

  1. 通過詢問用戶另一個號碼並打印出先前消息的許多副本來添加到先前的程序中。(提示:操作順序在Python中存在)
  2. 在單獨的行上打印出先前消息的許多副本。(提示:字符串"\n與按ENTER按鈕相同)

Chacrater input字符輸入 << Previous Next >> Discussion討論區-1

Copyright © All rights reserved | This template is made with by Colorlib